How to fix NameError: name 'colors' is not defined